<?php

spl_autoload_register(function ($className){
    require "./{$className}.php";
});

$factory = new ProductsFactory();
$productA = $factory->create('A');
$productB = $factory->create('B');

var_dump($productA);
var_dump($productB);

